//
// Created by 11510 on 2024/6/18.
//

#ifndef DAY57_FIGURE_H
#define DAY57_FIGURE_H

#include <string>
#include <iostream>

using std::string;
using std::cout;
using std::endl;

class Figure {
public:
    virtual string getName() const = 0;

    virtual double getArea() const = 0;
};

void display(Figure &fig) {
    cout << fig.getName()
         << "的面积是:"
         << fig.getArea() << endl;
}




#endif //DAY57_FIGURE_H
